package ${package}.entity;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
<#if hasBigDecimal>
import java.math.BigDecimal;
</#if>
<#if hasDate>
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
</#if>
import lombok.Data;

/**
 * ${table.comment}
 * @author 微风不留尘
 */
@Data
@TableName("${table.name}")
@ApiModel("${table.comment}")
public class ${entityName} {
<#list table.columns as column>
    /**
     * ${column.comment}
     */
    @ApiModelProperty("${column.comment}")
    <#if column.primary>
    @TableId(value = "${column.name}", type = IdType.AUTO)
    <#else>
    @TableField("${column.name}")
    </#if>
    <#if column.type == "datetime" || column.type == "timestamp">
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    </#if>
    <#if column.type == "date">
    @JsonFormat(pattern = "yyyy-MM-dd")
    </#if>
    private ${CodeGeneratorUtils.convertType(column.type)} ${CodeGeneratorUtils.toCamelCase(column.name, false)};
</#list>
}